test.generate.ngramModel:
	make clean
	make mvn.clean_compile
	cp apd1v3-vocab-utf8.1.single apd1v3-vocab-utf8
	make exec.run.generate.ngram.model
test.ngramStatistics.ajax:
	make clean
	make mvn.clean_compile
	make tcopy
	make exec.ngram.statistics.ajax
	make less
test.ngramStatistics.google.wiedau:
	make clean
	make mvn.clean_compile
	cp -v apd1v3-vocab-utf8.1.single apd1v3-vocab-utf8
	make exec.ngram.statistics.google.wiedau
	make less
test.ngramStatistics.google:
	make clean
	make mvn.clean_compile
	cp -v apd1v3-vocab-utf8.1.single apd1v3-vocab-utf8
	make exec.ngram.statistics.google
	make less

test.ngramStatistics.yahoo:
	make clean
	make mvn.clean_compile
	cp -v apd1v3-vocab-utf8.1.single apd1v3-vocab-utf8
	make exec.ngram.statistics.yahoo
	make less
real.ngramStatistics.yahoo:
	make clean
	make mvn.clean_compile
	cp -v apd1v3-vocab-utf8.backup apd1v3-vocab-utf8
	make exec.ngram.statistics.yahoo
	make less
real.ngramStatistics.google.wiedau:
	make clean
	make mvn.clean_compile
	cp -v apd1v3-vocab-utf8.backup apd1v3-vocab-utf8
	make exec.ngram.statistics.google.wiedau
	make less
real.ngramStatistics.ajax:
	make clean
	make mvn.clean_compile
	cp -v apd1v3-vocab-utf8.backup apd1v3-vocab-utf8
	make exec.ngram.statistics.ajax
	make less
real.generate.ngramModel:
	make clean
	make mvn.clean_compile
	cp apd1v3-vocab-utf8.backup apd1v3-vocab-utf8
	make exec.run.generate.ngram.model
tcopy:
	cp -v apd1v3-vocab-utf8.1.single apd1v3-vocab-utf8
### program exec target ###
exec.ngram.statistics.google:
	mvn exec:java -Dexec.mainClass=sk.mka.phd.googleagent.app.NgramStatisticsGoogleApp
exec.ngram.statistics.google.wiedau:
	mvn exec:java -Dexec.mainClass=sk.mka.phd.googleagent.app.NgramStatisticsAjaxWiedauApp
exec.ngram.statistics.ajax:
	mvn exec:java -Dexec.mainClass=sk.mka.phd.googleagent.app.NgramStatisticsAjaxGoogleApisApp
exec.ngram.statistics.yahoo:
	mvn exec:java -Dexec.mainClass=sk.mka.phd.googleagent.app.NgramStatisticsYahooApp
###
exec.run.generate.ngram.model:
	mvn exec:java -Dexec.mainClass=sk.mka.phd.googleagent.GenerateNgramModelApp
exec.generate.statistics:
	mvn exec:java -Dexec.mainClass=sk.mka.phd.googleagent.GenerateStatisticsApp

### generic maven targets ###
mvn.clean_compile:
	make mvn.clean
	make mvn.install
mvn.clean:
	mvn clean
mvn.install:
	mvn install
### generic program targets ### 
less:
	less *.out
	less *.log
clean:
	find . -type f -name ".*" -exec rm -f {} \;
	rm -rf *.log
	rm -rf *.out
	rm -rf *~
	rm -rf html
	rm -rf latex
	rm -rf out/*.*
### generic tex targets ###
doxygen:
	doxygen Doxyfile
	firefox html/index.html &
doxygen.tex:
	doxygen Doxyfile
	cd latex/ &&  make pdf && evince refman.pdf &
